<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateDocStatus.aspx.cs" Inherits="MyCustomModules_UpdateDocStatus" %>
<portal:HeadingControl ID="heading" runat="server" Text="Update status" Font-Size="Large" Font-Names="Verdana" />

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title >Update Status</title>
</head>

<body >
    <form id="form1" runat="server">
    <script language="JavaScript">
        <!--
        function refreshParent() {
            window.opener.location.href = window.opener.location.href;
        }
        
        function closeParent(){
            refreshParent();
            return window.close();
        }
        //-->
    </script> 



    <div>
    <asp:HyperLink ID="lnlHome" runat="server" Text="Home" ></asp:HyperLink>
    <br />
    <asp:GridView ID="grdStatus" runat="server" AutoGenerateColumns="False" DataKeyNames="AuditID,StatusID" Width="100%" Font-Size="Smaller" Font-Names="Verdana"   >    
        <Columns>         
            <asp:TemplateField HeaderText="" SortExpression="StatusImage" ItemStyle-Width="3%"> 
                <ItemTemplate>
                    <asp:Image ID="Image1" ImageUrl='<%# "~/" + Eval("SingleImagePath") %>' runat="server" Width="17" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Status" SortExpression="Status" ItemStyle-Width="15%"> 
                <ItemTemplate>
                    <asp:Label runat="server" Text='<%# Eval("Description") %>' ID="lblDesc"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Done" SortExpression="Done" ItemStyle-Width="3%"> 
                <ItemTemplate>
                   <asp:CheckBox ID="chkComplete" runat="server" Enabled='<%# GetMarkAsRead( Eval("MarkAsRead")) %>' Checked='<%# GetCompletedStatus( Eval("Status")) %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Date/Time" SortExpression="Date/Time" ItemStyle-Width="15%"> 
                <ItemTemplate>
                    <asp:Label ID="timeStamp" runat="server" Text='<%# GetFormatedTime(Eval("Timestamp")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Comments" SortExpression="Comments" ItemStyle-Width="65%"> 
                <ItemTemplate>
                    <asp:TextBox ID="txtComments" runat="server" TextMode="MultiLine" Height="40" Width="400" Enabled='<%# GetCommentEnabled(Eval("MarkAsRead"))%>' Text='<%# Eval("Comments") %>' Font-Names="Verdana" Font-Size="Smaller" ></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns> 
    </asp:GridView>

    <br />

    <asp:Button ID="btnAddNewStatusClose" runat="server" Text="Save and Close" OnClick="AddNewStatusClick"/>&nbsp;&nbsp;
    <asp:Button ID="btnAddNewStatus" runat="server" Text="Save" OnClick="AddNewStatusClick" />&nbsp;&nbsp;
    <asp:Button ID="btnClose" runat="server" Text="Close" OnClick="AddNewStatusClick" />
    <br />
    <asp:Label ID="lblMessage" runat="server"></asp:Label>
    </div>
    </form>
</body>
</html>
